package org.jeecg.modules.assets.service.impl;


import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.util.TypeUtils;
import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.impl.db.EnginePersistenceLogger;
import org.jeecg.modules.assets.mapper.MdMapper;
import org.jeecg.modules.assets.vo.DoubleEndVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class MdService {


    @Autowired
    private MdMapper mapper;

    @Autowired
    private WechatUtils wchatUtils;

    public void endDoubleEndAssets(Integer deptId) {

        List<DoubleEndVO> doubleEndVOS = mapper.endDoubleEndAssets(deptId);
        for (DoubleEndVO doubleEndVO : doubleEndVOS) {
            log.info("考勤异常通知："+ JSONObject.toJSONString(doubleEndVO));
            wchatUtils.endDoubleEndAssets(doubleEndVO);

        }


    }
}
